<div id="news">
<h4> Tài Khoản Admin </h4>
</div>
<?php
	$sql="SELECT * FROM  us_admin  ";
	$spql=$dp->QueryAll($sql);
?>
<table width="100%"  border="1" cellspacing="5" cellpadding="5">
	<tr>
		<td width="20" align="center" valign="middle"><strong>STT</strong></td>
		<td  width="100" align="center" ><strong>Tên Tài Khoản</strong></td>
		<td width="100" align="center" valign="middle"><strong>Cho Phép/ Không </strong></td>
		<td width="100" align="center" valign="middle"><strong>Mật Khẩu</strong></td>
		<td width="100" align="center" valign="middle"><strong>Email</strong></td>
	<td width="100" align="center" valign="middle"><strong>giới Tính</strong></td>
	<td width="100" align="center" valign="middle"><strong>Số  Điện Thoại</strong></td>
		<td width="50" align="center" valign="middle"><strong>Xóa</strong></td>
		<td width="50" align="center" valign="middle"><strong>Sửa</strong></td>
	</tr>
	<?php 
		for($i=0;$i<count($spql);$i++)
		{
			$id=$spql[$i]['id'];
			$user_name=$spql[$i]['user_name'];
			$gioitinh=$spql[$i]['gioitinh'];
			$sdt=$spql[$i]['sdt'];
			$email=$spql[$i]['email'];
			$password=$spql[$i]['password'];
			$states=$spql[$i]['states'];
			if($spql[$i]['states']==1)
			{
				$states="<img src='IMAGES/hien.png' />";
			}
			else
			{
				$states="<img src='IMAGES/an.png' />";
			}
			
			
		    $delete="<img src='IMAGES/xoa.png' />";
			$update="<img src='IMAGES/sua.png' />";
	?>
	<tr>
		<td width="20" align="center" valign="middle"><?php echo ($i+1); ?></td>
	     <td ><?php echo $user_name; ?></td>
		<td align="center"> <a href="index.php?option=admin&cat=states&id=<?php echo $id?>">
			<?php echo $states;?>
			</a></td>
		<td align="center"><?php echo $password;?></td>
		<td align="center"><?php echo $email;?></td>
		<td align="center"><?php echo $gioitinh;?></td>
		<td align="center"><?php echo $sdt;?></td>
		
				<td align="center">
			<a href="index.php?option=admin&cat=delete&id=<?php echo $id?>">
			<?php echo $delete;?>
			</a>
		</td>
		<td align="center">
			<a href="index.php?option=admin&cat=update&id=<?php echo $id?>">
			<?php echo $update;?>
			</a>
		</td>
	
	</tr>
	<?php
		}
	?>
</table>